package com.runen.infinitemovement.adapter;

import android.content.Context;
import android.text.TextUtils;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.runen.infinitemovement.R;
import com.runen.infinitemovement.model.entity.DepartmentsEntity;

import java.util.List;

public class CompanyGroupAdapter extends BaseQuickAdapter<DepartmentsEntity, BaseViewHolder> {
    private Context context;

    public CompanyGroupAdapter(Context context) {
        super(R.layout.item_company_group);
        this.context = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, DepartmentsEntity item) {
        helper.setText(R.id.tv_team_name, item.name);
        helper.setText(R.id.tv_principal_name, TextUtils.isEmpty(item.leader) ? "暂无负责人" : item.leader);
    }
}
